﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace POVRay {
    [PRBlock("reflection")]
    public class Reflection : Block {
        [PRParam("", HasComma = true)]
        public Color? Min { get; set; }

        [PRParam("")]
        public Color Max { get; set; }

        [PRParam("fresnel")]
        public bool Fresnel { get; set; }

        [PRParam("falloff")]
        public float? Falloff { get; set; }

        [PRParam("exponent")]
        public float? Exponent { get; set; }

        [PRParam("metallic")]
        public float? Metallic { get; set; }

        public Reflection(Color max) {
            Max = max;
        }

        public Reflection(Color? min, Color max, bool fresnel, float? falloff, float? exponent, float? metallic) {
            Min = min;
            Max = max;
            Fresnel = fresnel;
            Falloff = falloff;
            Exponent = exponent;
            Metallic = metallic;
        }

        public static implicit operator Reflection(Color max) {
            return new Reflection(max);
        }

        public static implicit operator Reflection(float max) {
            return new Reflection(max);
        }

        public override string ToString(int level) {
            return this.POVRayString(level);
        }
    }
}
